<?php
namespace app\index\controller;
use \think\Controller;
use \think\Request;
class Fightimg extends Controller
{
	public function index()
	{
		

		return view('Fightimg/index');
	}

	public function popimg()
	{
		$popimg  = array();
		$imgBase = config('view_replace_str.__IMG__');
		for ($i=1; $i < 11; $i++) { 
			$popimg[$i]['info'] = '来呀，斗图！';
			$popimg[$i]['img'] = $imgBase . '/' . $i . '.jpg';
			$popimg[$i]['speed'] = 25;
		}

		echo  json_encode($popimg[array_rand($popimg)]);
	}

}